"""
配置管理模块
"""
from typing import Any
from dataclasses import dataclass


@dataclass
class SamplingConfig:
    """采样配置"""
    sample_rate: int = 1000  # 采样频率 Hz
    buffer_size: int = 1000000  # 缓冲区大小（百万级）
    batch_size: int = 10000  # 批次大小
    enable_compression: bool = True  # 启用压缩


@dataclass
class VisualizationConfig:
    """可视化配置"""
    max_display_rows: int = 100000  # 最大显示行数
    refresh_interval: int = 100  # 刷新间隔 ms
    enable_virtual_scroll: bool = True  # 启用虚拟滚动
    chart_update_interval: int = 500  # 图表更新间隔 ms


@dataclass
class SystemConfig:
    """系统配置"""
    sampling: SamplingConfig = SamplingConfig()
    visualization: VisualizationConfig = VisualizationConfig()
    use_cpp_engine: bool = True  # 使用C++引擎
    thread_pool_size: int = 4  # 线程池大小


# 全局配置实例
CONFIG = SystemConfig()
